package com.example.springboot.mapper;

import com.example.springboot.controller.request.BaseRequest;
import com.example.springboot.entity.Admin;
import com.example.springboot.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper //@Mapper注解将mapper标注为spring的一个组件
//使用mapper将数据传入数据库
public interface AdminMapper {

//用户列表
    List<Admin> list();

    void register(Admin admin);

    List<Admin> listByCondition(BaseRequest baseRequest);

    void save(Admin admin);

    Admin getById(Integer id);

    void updateById(Admin admin);

    void deleteById(Integer id);

    Admin getByAdminName(String adminName);

    Admin getByAdminNameAndPassword(@Param("adminName") String adminName, @Param("password") String password);

}
